package com.start_eternity.oasissafewalk.mapper;

import com.start_eternity.oasissafewalk.pojo.OrderDates;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * author:ZhangT
 * Date:2024 / 03 / 29 / 23:25
 * Description:
 */
public interface OrderDatesMapper {

    //根据Id查询
    @Select("select * from `order_dates` where order_date_id = #{orderDateId}")
    OrderDates query(@Param("orderDateId") Integer orderDateId);

    //订单天数的添加
    @Insert("insert into `order_dates`(order_id,year,month,date,number_days) values (#{orderId}, #{year}, #{month}, #{date}, #{numberDays})")
    int insertOrderDates(OrderDates orderDates);

    //修改订单的天数
    int updateNumDays(OrderDates orderDates);
}
